<?php

function calculateTaxData($input)
{
	$age = (int)$input['Age'];
	$gender = (int)$input['Gender'] == 0 ? true : false;
	$yearlyIncome = (double)$input['YearlyIncome'];
	$packsOfCigarettes = (double)$input['PacksOfCigarettes'];
	$litresOfFuel = (double)$input['LitresOfFuel'];
	$litresOfSprits = (double)$input['LitresOfSprits'];
	$pintsOfBeer = (double)$input['PintsOfBeer'];
	$totalSpentOnVAT = (double)$input['MonthlyVATExpendature'];

	if($yearlyIncome == 0)
		return ACTUALLY_IS_DOLAN(1, "gooby plz");

	$output = array(
		"HasSwag" => true, 
		"Magic" => 0xDEADBEEF,
		"Security" => "yolo");
	$outContent = array();

	// Total Income Tax Paid
	$outContent['TotalTaxPaid'] = json_decode(file_get_contents('http://taxman.openspending.org/gb?income=' . $yearlyIncome), true);
	$outContent['TotalTaxPaid'] = $outContent['TotalTaxPaid']['calculation']['directs']['total'];

	// Funding Destination %
	$outContent['FundingDestination'] = array(
											"HealthCare" => array(	"Total" => 24.38,  
																	"Breakdown" => array(	
																							"MedicalSupplies" => 97.69,
																							"PublicHealth" => 1.58,
																							"HealthResearch" => 0.73
																						)
																	),

											"Enviroment" => array( 	"Total" => 1.00,
																	"Breakdown" => array(	
																							"Waste" => 37.82,
																							"EnviromentalProtectionAdministrator" => 35.16,
																							"ResearchIntoEnviromentalProtection" => 7.93,
																							"EnviromentalProtection" => 8.45,
																							"Polution" => 10.44,
																							"WasteWaterManagement" => 0.2,
																						)
																 	),

											"HelpingOthers" => array("Total" => 35.77,
																	 "Breakdown" => array(
																	 						"OldAge" => 47.43,
																	 						"SicknessAndDisability" => 19.46,
																	 						"SociallyExcluded" => 13.43,
																	 						"FamilyAndChildren" => 12.16,
																	 						"TheUnemployed" => 4.91,
																	 						"HelpingOthersAdmin" => 1.22,
																	 						"Survivors" => 1.02,
																	 						"Housing" => 0.37
																	 					 )
																	),

											"SocialSystems" => array("Total" => 5.91,
																	 "Breakdown" => array(
																	 						"Transport" => 40.14,
																	 						"GeneralEcnomic" => 26.40,
																	 						"FarmingForestsFish" => 16.08,
																	 						"ResearchIntoInfoStructure" => 11.07,
																	 						"Finance" => 2.87,
																	 						"Communication" => 1.87,
																	 						"Energy" => 1.18,
																	 						"OtherIndustries" => 0.34,
																	 						"MiningManufacturingConstruction" => 0.05
																	 					 )
																	),

											"Education" => array(	"Total" => 6.39,
																	"Breakdown" => array(
																							"SecondaryAndFurther" => 41.33,
																							"University" => 40.39,
																							"EducationAdmin" => 6.85,
																							"ExtraEducationServices" => 6.83,
																							"PreSchoolAndPrimary" => 2.54,
																							"MiscEducation" => 1.99,
																							"EducationResearch" => 0.07,
																							"PostSecondary" => 0.01
																						)
																),

											"OrderAndSafety" => array(	"Total" => 3.25,
																		"Breakdown" => array(
																								"TheCourts" => 39.72,
																								"Prisons" => 28.81,
																								"Police" => 27.12,
																								"OrderAndSafetyAdmin" => 2.62,
																								"FireBrigade" => 1.55,
																								"ResearchIntoOrderAndSafety" => 0.18
																							)
																	 ),

											"Defence" => array( 	"Total" => 7.04,
																	"Breakdown" => array(
																							"Military" => 91.54,
																							"DefenceAdmin" => 6.81,
																							"ResearchAndDevelopment" => 1.63,
																							"CivilianDefence" => 0.02
																						)
															  ),

											"Culture" => array(		"Total" => 1.56,
																	"Breakdown" => array(
																							"Media" => 50.30,
																							"Culture" => 26.53,
																							"SportAndRecreation" => 19.69,
																							"CultureResearch" => 1.74,
																							"CultureAdmin" => 1.55,
																							"Religion" => 0.19
																						)
															  ),

											"RunningGovernment" => array(	"Total" => 13.54,
																			"Breakdown" => array(
																									"PublicDebtManagement" => 62.57,
																									"TopLevelGovernment" => 25.13,
																									"OverseasEcnomicAid" => 9.35,
																									"MiscServices" => 1.16,
																									"EuropeanUnion" => 1.00,
																									"PublicServicesAdmin" => 0.61,
																									"Research" => 0.14,
																									"ResearchIntoRunningGovernment" => 0.04
																								)
																		),

											"OurStreets" => array(	"Total" => 1.16,
																	"Breakdown" => array(
																							"Housing" => 72.93,
																							"Water" => 12.56,
																							"Community" => 10.57,
																							"CommunityAdmin" => 3.51,
																							"StreetLights" => 0.34,
																							"ResearchIntoCommunity" => 0.09
																						)
																 )
											);

	// Funding, Actually Paid
	$outContent['ActualDestinationAmmounts'] = array(
											"HealthCare" => array(	"Total" => (double)$outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['HealthCare']['Total'] / 100),
																	"Breakdown" => array(
																							"MedicalSupplies" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['HealthCare']['Total'] / 100) * ($outContent['FundingDestination']['HealthCare']['Breakdown']['MedicalSupplies'] / 100
																								),
																							"PublicHealth" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['HealthCare']['Total'] / 100) * ($outContent['FundingDestination']['HealthCare']['Breakdown']['PublicHealth'] / 100
																								),
																							"HealthResearch" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['HealthCare']['Total'] / 100) * ($outContent['FundingDestination']['HealthCare']['Breakdown']['HealthResearch'] / 100
																								)
																						)
																),

											"Enviroment" => array( 	"Total" => (double)$outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['Enviroment']['Total']  / 100),
																	"Breakdown" => array(
																							"Waste" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['Enviroment']['Total'] / 100) * ($outContent['FundingDestination']['Enviroment']['Breakdown']['Waste'] / 100
																								),
																							"EnviromentalProtectionAdministrator" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['Enviroment']['Total'] / 100) * ($outContent['FundingDestination']['Enviroment']['Breakdown']['EnviromentalProtectionAdministrator'] / 100
																								),
																							"ResearchIntoEnviromentalProtection" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['Enviroment']['Total'] / 100) * ($outContent['FundingDestination']['Enviroment']['Breakdown']['ResearchIntoEnviromentalProtection'] / 100
																								),
																							"EnviromentalProtection" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['Enviroment']['Total'] / 100) * ($outContent['FundingDestination']['Enviroment']['Breakdown']['EnviromentalProtection'] / 100
																								),
																							"Polution" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['Enviroment']['Total'] / 100) * ($outContent['FundingDestination']['Enviroment']['Breakdown']['Polution'] / 100
																								),
																							"WasteWaterManagement" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['Enviroment']['Total'] / 100) * ($outContent['FundingDestination']['Enviroment']['Breakdown']['WasteWaterManagement'] / 100
																								)
																							
																						)
																),

											"HelpingOthers" => array(	"Total" => (double)$outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['HelpingOthers']['Total']  / 100),
																		"Breakown" => array(
																								"OldAge" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['HelpingOthers']['Total'] / 100) * ($outContent['FundingDestination']['HelpingOthers']['Breakdown']['OldAge'] / 100
																								),
																								"SicknessAndDisability" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['HelpingOthers']['Total'] / 100) * ($outContent['FundingDestination']['HelpingOthers']['Breakdown']['SicknessAndDisability'] / 100
																								),
																								"SociallyExcluded" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['HelpingOthers']['Total'] / 100) * ($outContent['FundingDestination']['HelpingOthers']['Breakdown']['SociallyExcluded'] / 100
																								),
																								"FamilyAndChildren" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['HelpingOthers']['Total'] / 100) * ($outContent['FundingDestination']['HelpingOthers']['Breakdown']['FamilyAndChildren'] / 100
																								),
																								"TheUnemployed" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['HelpingOthers']['Total'] / 100) * ($outContent['FundingDestination']['HelpingOthers']['Breakdown']['TheUnemployed'] / 100
																								),
																								"HelpingOthersAdmin" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['HelpingOthers']['Total'] / 100) * ($outContent['FundingDestination']['HelpingOthers']['Breakdown']['HelpingOthersAdmin'] / 100
																								),
																								"Survivors" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['HelpingOthers']['Total'] / 100) * ($outContent['FundingDestination']['HelpingOthers']['Breakdown']['Survivors'] / 100
																								),
																								"Housing" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['HelpingOthers']['Total'] / 100) * ($outContent['FundingDestination']['HelpingOthers']['Breakdown']['Housing'] / 100
																								)
																						   )
																	),

											"SocialSystems" => array(	"Total" => (double)$outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['SocialSystems']['Total']  / 100),
																		"Breakdown" => array(
																								"Transport" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['SocialSystems']['Total'] / 100) * ($outContent['FundingDestination']['SocialSystems']['Breakdown']['Transport'] / 100
																								),
																								"GeneralEcnomic" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['SocialSystems']['Total'] / 100) * ($outContent['FundingDestination']['SocialSystems']['Breakdown']['GeneralEcnomic'] / 100
																								),
																								"FarmingForestsFish" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['SocialSystems']['Total'] / 100) * ($outContent['FundingDestination']['SocialSystems']['Breakdown']['FarmingForestsFish'] / 100
																								),
																								"ResearchIntoInfoStructure" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['SocialSystems']['Total'] / 100) * ($outContent['FundingDestination']['SocialSystems']['Breakdown']['ResearchIntoInfoStructure'] / 100
																								),
																								"Finance" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['SocialSystems']['Total'] / 100) * ($outContent['FundingDestination']['SocialSystems']['Breakdown']['Finance'] / 100
																								),
																								"Communication" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['SocialSystems']['Total'] / 100) * ($outContent['FundingDestination']['SocialSystems']['Breakdown']['Communication'] / 100
																								),
																								"Energy" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['SocialSystems']['Total'] / 100) * ($outContent['FundingDestination']['SocialSystems']['Breakdown']['Energy'] / 100
																								),
																								"OtherIndustries" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['SocialSystems']['Total'] / 100) * ($outContent['FundingDestination']['SocialSystems']['Breakdown']['OtherIndustries'] / 100
																								),
																								"MiningManufacturingConstruction" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['SocialSystems']['Total'] / 100) * ($outContent['FundingDestination']['SocialSystems']['Breakdown']['MiningManufacturingConstruction'] / 100
																								)																							
																							)
																	),

											"Education" => array(	"Total" => (double)$outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['Education']['Total']  / 100),
																	"Breakdown" => array(
																							"SecondaryAndFurther" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['Education']['Total'] / 100) * ($outContent['FundingDestination']['Education']['Breakdown']['SecondaryAndFurther'] / 100
																							),
																							"University" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['Education']['Total'] / 100) * ($outContent['FundingDestination']['Education']['Breakdown']['University'] / 100
																							),
																							"EducationAdmin" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['Education']['Total'] / 100) * ($outContent['FundingDestination']['Education']['Breakdown']['EducationAdmin'] / 100
																							),
																							"ExtraEducationServices" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['Education']['Total'] / 100) * ($outContent['FundingDestination']['Education']['Breakdown']['ExtraEducationServices'] / 100
																							),
																							"PreSchoolAndPrimary" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['Education']['Total'] / 100) * ($outContent['FundingDestination']['Education']['Breakdown']['PreSchoolAndPrimary'] / 100
																							),
																							"MiscEducation" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['Education']['Total'] / 100) * ($outContent['FundingDestination']['Education']['Breakdown']['MiscEducation'] / 100
																							),
																							"EducationResearch" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['Education']['Total'] / 100) * ($outContent['FundingDestination']['Education']['Breakdown']['EducationResearch'] / 100
																							),
																							"PostSecondary" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['Education']['Total'] / 100) * ($outContent['FundingDestination']['Education']['Breakdown']['PostSecondary'] / 100
																							),
																							
																					   )
																),

											"OrderAndSafety" => array( 	"Total" => (double)$outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['OrderAndSafety']['Total']  / 100),
																		"Breakdown" => array(
																								"TheCourts" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['OrderAndSafety']['Total'] / 100) * ($outContent['FundingDestination']['OrderAndSafety']['Breakdown']['TheCourts'] / 100
																								),
																								"Prisons" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['OrderAndSafety']['Total'] / 100) * ($outContent['FundingDestination']['OrderAndSafety']['Breakdown']['Prisons'] / 100
																								),
																								"Police" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['OrderAndSafety']['Total'] / 100) * ($outContent['FundingDestination']['OrderAndSafety']['Breakdown']['Police'] / 100
																								),
																								"OrderAndSafetyAdmin" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['OrderAndSafety']['Total'] / 100) * ($outContent['FundingDestination']['OrderAndSafety']['Breakdown']['OrderAndSafetyAdmin'] / 100
																								),
																								"FireBrigade" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['OrderAndSafety']['Total'] / 100) * ($outContent['FundingDestination']['OrderAndSafety']['Breakdown']['FireBrigade'] / 100
																								),
																								"ResearchIntoOrderAndSafety" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['OrderAndSafety']['Total'] / 100) * ($outContent['FundingDestination']['OrderAndSafety']['Breakdown']['ResearchIntoOrderAndSafety'] / 100
																								)
																							)
																	),
	
											"Defence" => array(		"Total" => (double)$outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['Defence']['Total']  / 100),
																	"Breakdown" => array(
																							"Military" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['Defence']['Total'] / 100) * ($outContent['FundingDestination']['Defence']['Breakdown']['Military'] / 100
																							),
																							"DefenceAdmin" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['Defence']['Total'] / 100) * ($outContent['FundingDestination']['Defence']['Breakdown']['DefenceAdmin'] / 100
																							),
																							"ResearchAndDevelopment" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['Defence']['Total'] / 100) * ($outContent['FundingDestination']['Defence']['Breakdown']['ResearchAndDevelopment'] / 100
																							),
																							"CivilianDefence" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['Defence']['Total'] / 100) * ($outContent['FundingDestination']['Defence']['Breakdown']['CivilianDefence'] / 100
																							)																							
																						)
															 ),

											"Culture" => array(		"Total" => (double)$outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['Culture']['Total']  / 100),
																	"Breakdown" => array(
																							"Media" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['Culture']['Total'] / 100) * ($outContent['FundingDestination']['Culture']['Breakdown']['Media'] / 100
																							),
																							"Culture" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['Culture']['Total'] / 100) * ($outContent['FundingDestination']['Culture']['Breakdown']['Culture'] / 100
																							),
																							"SportAndRecreation" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['Culture']['Total'] / 100) * ($outContent['FundingDestination']['Culture']['Breakdown']['SportAndRecreation'] / 100
																							),
																							"CultureResearch" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['Culture']['Total'] / 100) * ($outContent['FundingDestination']['Culture']['Breakdown']['CultureResearch'] / 100
																							),
																							"CultureAdmin" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['Culture']['Total'] / 100) * ($outContent['FundingDestination']['Culture']['Breakdown']['CultureAdmin'] / 100
																							),
																							"Religion" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['Culture']['Total'] / 100) * ($outContent['FundingDestination']['Culture']['Breakdown']['Religion'] / 100
																							)
																						)
															  ),

											"RunningGovernment" => array(	"Total" => (double)$outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['RunningGovernment']['Total']  / 100),
																			"Breakdown" => array(
																									"PublicDebtManagement" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['RunningGovernment']['Total'] / 100) * ($outContent['FundingDestination']['RunningGovernment']['Breakdown']['PublicDebtManagement'] / 100
																									),
																									"TopLevelGovernment" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['RunningGovernment']['Total'] / 100) * ($outContent['FundingDestination']['RunningGovernment']['Breakdown']['TopLevelGovernment'] / 100
																									),
																									"OverseasEcnomicAid" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['RunningGovernment']['Total'] / 100) * ($outContent['FundingDestination']['RunningGovernment']['Breakdown']['OverseasEcnomicAid'] / 100
																									),
																									"MiscServices" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['RunningGovernment']['Total'] / 100) * ($outContent['FundingDestination']['RunningGovernment']['Breakdown']['MiscServices'] / 100
																									),
																									"EuropeanUnion" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['RunningGovernment']['Total'] / 100) * ($outContent['FundingDestination']['RunningGovernment']['Breakdown']['EuropeanUnion'] / 100
																									),
																									"PublicServicesAdmin" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['RunningGovernment']['Total'] / 100) * ($outContent['FundingDestination']['RunningGovernment']['Breakdown']['PublicServicesAdmin'] / 100
																									),
																									"Research" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['RunningGovernment']['Total'] / 100) * ($outContent['FundingDestination']['RunningGovernment']['Breakdown']['Research'] / 100
																									),
																									"ResearchIntoRunningGovernment" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['RunningGovernment']['Total'] / 100) * ($outContent['FundingDestination']['RunningGovernment']['Breakdown']['ResearchIntoRunningGovernment'] / 100
																									)
																								)
																		),

											"OurStreets" => array(			"Total" => (double)$outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['OurStreets']['Total']  / 100),
																			"Breakdown" => array(
																									"Housing" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['OurStreets']['Total'] / 100) * ($outContent['FundingDestination']['OurStreets']['Breakdown']['Housing'] / 100
																									),
																									"Water" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['OurStreets']['Total'] / 100) * ($outContent['FundingDestination']['OurStreets']['Breakdown']['Water'] / 100
																									),
																									"Community" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['OurStreets']['Total'] / 100) * ($outContent['FundingDestination']['OurStreets']['Breakdown']['Community'] / 100
																									),
																									"CommunityAdmin" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['OurStreets']['Total'] / 100) * ($outContent['FundingDestination']['OurStreets']['Breakdown']['CommunityAdmin'] / 100
																									),
																									"StreetLights" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['OurStreets']['Total'] / 100) * ($outContent['FundingDestination']['OurStreets']['Breakdown']['StreetLights'] / 100
																									),
																									"ResearchIntoCommunity" => $outContent['TotalTaxPaid'] * ($outContent['FundingDestination']['OurStreets']['Total'] / 100) * ($outContent['FundingDestination']['OurStreets']['Breakdown']['ResearchIntoCommunity'] / 100
																									)
																								)
																 )
											);

	// Money Spent on SUPARTAX
	$outContent['SuperTaxedItems'] = array(	"Fuel" => array("PerWeek" => ($litresOfFuel * 0.5795) / 4,
															"PerMonth" => $litresOfFuel * 0.5795,
															"PerYear" => ($litresOfFuel * 0.5795) * 12
															),

											"Cigarettes" => array("PerWeek" => ($packsOfCigarettes * 0.37 / 4),
																  "PerMonth"  => $packsOfCigarettes * 0.37,
																  "PerYear" => ($packsOfCigarettes * 0.37) * 12
																  ),

											"AlcoholBeer" => array( "PerWeek" => ($pintsOfBeer * 0.5795) / 4,
																	"PerMonth" => $pintsOfBeer * 0.5795,
																	"PerYear" => ($pintsOfBeer * 0.5795) * 12
																	),

											"AlcoholSprits" => array("PerWeek" => ($litresOfSprits * 26.81) / 4,
																	 "PerMonth" => $litresOfSprits * 26.81,
																	 "PerYear" => ($litresOfSprits * 26.81) * 12
																	 )
											);

	// VAT Expendature
	$outContent['VATExpendature'] = array(  "PerWeek" => (0.20 * $totalSpentOnVAT) / 4,
											"PerMonth" => 0.20 * $totalSpentOnVAT ,
											"PerYear" => (0.20 * $totalSpentOnVAT) * 12);

	$output['Content'] = $outContent;
	$hash = sha1(json_encode($output));
	$output['Security'] = $hash;

	return json_encode($output);
}

?>